package my.jwds.p492;

import java.lang.reflect.Array;
import java.util.Arrays;

public class ConstructRectangle {
    public static void main(String[] args) {
        ConstructRectangle obj = new ConstructRectangle();
        long start = System.currentTimeMillis();
        System.out.println(Arrays.toString(obj.constructRectangle(99999999)));
        System.out.println(System.currentTimeMillis() - start);
    }


    public int[] constructRectangle(int area) {
        int width = (int) Math.sqrt(area);
        while(area % width != 0){
            width --;
        }

        return new int[]{area/width,width};
    }
}
